package com.openbravo.pos.ticket;

import java.awt.Component;
import javax.swing.DefaultListCellRenderer;
import javax.swing.Icon;
import javax.swing.ImageIcon;
import javax.swing.JList;

public class FindTicketsRenderer extends DefaultListCellRenderer
{
  private Icon icoTicketNormal = new ImageIcon(getClass().getClassLoader().getResource("com/openbravo/images/pay.png"));
  private Icon icoTicketRefund = new ImageIcon(getClass().getClassLoader().getResource("com/openbravo/images/refund.png"));
  public static final int RECEIPT_NORMAL = 0;

  public Component getListCellRendererComponent(JList paramJList, Object paramObject, int paramInt, boolean paramBoolean1, boolean paramBoolean2)
  {
    super.getListCellRendererComponent(paramJList, null, paramInt, paramBoolean1, paramBoolean2);
    int i = ((FindTicketsInfo)paramObject).getTicketType();
    setText("<html><table>" + paramObject.toString() + "</table></html>");
    if (i == 0)
      setIcon(this.icoTicketNormal);
    else
      setIcon(this.icoTicketRefund);
    return this;
  }
}

/* Location:           D:\PowerFulPOS-2.30.2\openbravopos.jar
 * Qualified Name:     com.openbravo.pos.ticket.FindTicketsRenderer
 * JD-Core Version:    0.6.0
 */